<?php
namespace App\Http\Controllers\Api\Serializer;

use League\Fractal\Serializer\ArraySerializer;

class CustomSerializer extends ArraySerializer
{
    public function collection($resourceKey, array $data)
    {
        return [
            'message' => '操作成功',
            'status_code' => 200,
            'data' => $data
        ];
    }

    public function item($resourceKey, array $data)
    {
        return [
            'message' => '操作成功',
            'status_code' => 200,
            'data' => $data
        ];
    }
}